-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作业2-12-Cloud #30
作业2-12-Cloud #30
Conversation
2017-1/Cloud/2-12.cpp
Outdated
#define length 10 | ||
typedef struct LNode{ | ||
int data; | ||
LNode *next ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
仅接受C语言版的代码实现,不接受C++代码
建议使用后缀名.c
去调试无误后再行提交
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请问还有需要修改的部分吗~~结构体部分c++代码已经改正了。
2017-1/Cloud/2-12.cpp
Outdated
scanf("%d",& p->data ); | ||
p->next = L->next ;//��һ�����ʱL->next����һ�β���Ľڵ������������� | ||
L->next = p;//�����һ������ɵĽ�����ȥ�� | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意代码格式化,建议使用VS自动格式化代码
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
2017-1/Cloud/2-12.cpp
Outdated
//} | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用随机函数产生链表数据,不要手工输入
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已改
2017-1/Cloud/2-12.cpp
Outdated
printf("�������:"); | ||
LinkList p = L_->next ; | ||
for(int i = 0 ;i <length;i++){ | ||
//printf("%d ",(L_+i)->data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
循环结束条件设置有误,请重新考虑链表遍历方法
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已改
2017-1/Cloud/2-12.cpp
Outdated
CreatList(list_a,length); | ||
CreatList(list_b,length); | ||
MergeList(list_a,list_b,list_c); | ||
travle(list_c); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意缩进和代码格式化
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码整体没有问题,再修改一些细节问题就可以了。
2017-1/Cloud/test3-2.c
Outdated
return ERROR; | ||
} | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该加入default语句
2017-1/Cloud/test3-3.c
Outdated
if(ch != EOF){ | ||
ch = getchar(); | ||
}//��β���ʹch == EOF? | ||
DestroyStack(&_s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
销毁栈应该放到大的while循环外面,否则会使得程序第二次输入字符串时报错终止。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
经过修改之后没有问题,可以通过。
没有随机生成数字在构建单链表